<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
    Itcast.insertAfter=function(currentNode,objnode){
        var nextNode=objnode.nextSibling;
        if(nextNode){
            nextNode.parentNode.insertBefore(currentNode,nextNode);
        }else{
            objnode.parentNode.appendChild(currentNode);
        }
    }
    Itcast.fn.insertAfter=function(selector){
        var iobj=this.constructor(selector);
        var tmp=[],tmpNode;
        for(var i=0;i<this.lenght;i++){
            for(var j=0;i<iobj.length;j++){
                tmpNode=J==iobj.length-1?this[i]:this[i].cloneNode(true)
                tmp.push(tmpNode);
                Itcast.insertAfter(tmpNode,iobj[j])
            }
        }
        var tmpIobj = this.constructor();
        tmpIobj.prevObject = this;
        push.apply( tmpIobj, tmp );
        return tmpIobj;
    }
    Itcast.fn.after=function(selector){
        this.constructor(selector).insertAfter(this)
        return this
    }
</script>
</body>
</html>